﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Dapper.Moon
{
    public interface IDeleteable<T>
    {
        IDeleteable<T> Deleteable();
        IDeleteable<T> Deleteable(params object[] pks);
        IDeleteable<T> Where(Expression<Func<T, bool>> where);
        /// <summary>
        /// 设置表名
        /// </summary>
        /// <param name="tableName">表名</param>
        /// <param name="isQuote">是否转义</param>
        /// <returns></returns>
        IDeleteable<T> TableName(string tableName = null, bool isQuote = true);
        int Execute();
        int Truncate();
        Task<int> TruncateAsync();
        Task<int> ExecuteAsync();
        IDeleteable<T> Limit(int limit);
        SqlBuilderResult ToSql();
    }
}
